feat: replace KEYS() by SCAN()#122
Conversation
|
@seriousme Out of curiosity did you also did a quick benchmark? |
No I didn't. The challenge for me is to decide what the test should look like.
So all in all there are so many variables involved that I doubt we can make a generic statement on "performance" 😉 If you are unsure whether we will break performance, we could make it an option if you want. It was fun to solve this puzzle. Kind regards, |
|
@seriousme no worries I agree, I think anyway this is much better compared to the solution used before as |
|
@robertsLando aedes-persistence-redis/asyncPersistence.js Lines 89 to 96 in 043da05 This should give the smallest value for wildcard position, but now it gives the biggest. e.g. hello/+/world/# now gives 14 (the # ) where it should have returned 6 (the + ) I'll fix it tonight and try to add a test to prevent regression in the future. Kind regards, |
|
Oh I totally missed that! My fault, I think adding some tests with different patterns would be safer yeah |
|
The fix is in #123, matching retained messages lives in abstract.js, so I will try to add a pattern there. |
|
No worries :) |
This PR implements #119.
Few notable things:
Kind regards,
Hans